<?php
/**
 * @version		$Id: index.php 73 2010-01-13 14:59:20Z bulletprooftemplates $
 * @package		Joomla
 * @subpackage	Templates / basic skeleton template
 * @copyright	Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant to the
 * GNU General Public License, and as distributed it includes or is derivative
 * of works licensed under the GNU General Public License or other free or open
 * source software licenses. See COPYRIGHT.php for copyright notices and
 * details.
 */
defined('_JEXEC') or die('Restricted access');
include_once("includes/template_config.php");
$url = clone(JURI::getInstance());
$user =& JFactory::getUser();
$this->setGenerator('JoomlaWorkshop');
if (getPageIndexFile() !=''):
include_once getPageIndexFile();
;else:
?>
<?php echo '<?xml version="1.0" encoding="utf-8"?' .'>'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >

<head>
	<jdoc:include type="head" />
	<?php JHTML::_('behavior.mootools'); ?>
	<meta name="mssmarttagspreventparsing" content="true" />
	<meta http-equiv="imagetoolbar" content="no" />
	<link rel="shortcut icon" href="<?php echo $template_url; ?>/favicon.ico" type="image/x-icon" />
	<link rel="icon" href="<?php echo $template_url; ?>/favicon.png" type="image/png" />
	<link href="<?php echo $style_url; ?>/<?php echo $this->params->get('widthStyle'); ?>.css" rel="stylesheet" type="text/css" media="screen" />
	<link href="<?php echo $style_url; ?>/styles[compressed-wide].css" rel="stylesheet" type="text/css" media="screen" />	
	<link href="<?php echo $template_url ?>/html/overrides.css" rel="stylesheet" type="text/css" media="screen" />
	<?php echo ($this->params->get('diagnosticMode') == 1)?	'<link href="' . $style_url .'/diagnostics.css" rel="stylesheet" type="text/css" media="screen" />':'' ?>
	<link rel="alternate stylesheet" type="text/css" href="<?php echo $style_url; ?>/narrow.css" title="narrow" media="screen" />
	<link rel="alternate stylesheet" type="text/css" href="<?php echo $style_url; ?>/wide.css" title="wide" media="screen" />
	<?php echo getSectionCssFile() ;?>
	<?php echo getPageCssFile() ;?>
	<?php 
		echo ($this->params->get('styleSwitch') == 1)?'<script type="text/javascript" src="'. $script_url .'/styleswitch.js"></script>':'';
		echo ($this->params->get('fontResizer') == 1)?'<script type="text/javascript" src="'. $script_url .'/SlidingFontResizer.js"></script>':'';
	?>
	<!--[if lt IE 7]>
	<script src="<?php echo $script_url; ?>/DD_belatedPNG_0.0.8a-min.js"></script>
	<script>DD_belatedPNG.fix('img');</script>
	<style type="text/css"> body { behavior: url("<?php echo $style_url; ?>/iehover.htc"); }</style>
	<link rel="stylesheet" type="text/css" href="<?php echo $style_url; ?>/ie6.css" media="screen, projection" />
	<![endif]-->
	<!--[if IE 7]>
	<link rel="stylesheet" type="text/css" href="<?php echo $style_url; ?>/ie7.css" media="screen, projection" />
	<![endif]-->
	<?php if($this->direction == 'rtl') : ?><link href="<?php echo $style_url; ?>/rtl/layout_rtl.css" rel="stylesheet" type="text/css" /><?php endif; ?>
	<script type="text/javascript">
		window.onDomReady(function(){ new SmoothScroll({duration: 1200}); });
	</script>
	<?php if ($this->params->get('fontResizer') == 1): ?>
	<![if !(IE 6)]>
	<script type="text/javascript">
		<!--//
		window.addEvent('domready', function() {
			var resizer = new SlidingFontResizer($('resizer'), {
			targetArea: '<?php echo $style ;?>', 
			minSize: 12, 
			maxSize: 18, 
			showValuePanel: true
			});			
		});
		//-->
	</script>
	<![endif]>
	<?php endif; ?> 	
</head>

<body id="<?php echo $style ;?>" class="joomla page<?php echo getPageId(); ?> section<?php echo $section_id;?> <?php echo getCurrentAlias();?>">
	<div id="container">
		<a id="top" name="top"></a>

		<ul id="access">
			<?php if ($this->params->get('fontResizer') == 1): ?>
			<![if !(IE 6)]>
			<span id="resizer">I'm a resizer!</span>
			<![endif]>
			<?php endif; ?>
			<li><a href="<?php $url->setFragment('content'); echo $url->toString();?>" class="to-content">Content</a></li>
			
			<?php if ($this->countModules('navigation')) : ?>
			<li><a href="<?php $url->setFragment('mainmenu'); echo $url->toString();?>" class="to-nav">Navigation</a></li>
			<?php endif; ?>
			
			<?php if($this->countModules('user5 or user6 or user7 or user8')) : ?>
			<li><a href="<?php $url->setFragment('additional'); echo $url->toString();?>" class="to-additional">Additional Information</a></li>
			<?php endif; ?>
			
			<?php if ($this->params->get('styleSwitch') == 1): ?>
			<li class="narrow"><a href="#" onclick="setActiveStyleSheet('narrow'); return false;" title="Narrow">narrow</a></li>
			<li class="wide"><a href="#" onclick="setActiveStyleSheet('wide'); return false;" title="Wide">wide</a></li>
			<?php endif; ?>    
		</ul>

		<div id="header" class="clr clearfix">    
			<div id="branding">
				<?php if ($user->get('guest')) : ?>
				<h1><a href="<?php echo $this->baseurl ?>/" title="<?php echo $mainframe->getCfg('sitename');?>"><?php echo $mainframe->getCfg('sitename');?></a></h1>
				<?php else : ?>
				<p>Hello <?php echo $user->get('name');?><br />
				Your email address is: <?php echo $user->get('email');?> click <a href="<?php echo $this->baseurl ?>/index.php?option=com_user&amp;view=user&amp;task=edit#email" title="User details page">here</a> to change it<br />
				You are a: <?php echo $user->get('usertype');?> user<br />
				You registered on: <?php echo $user->get('registerDate');?><br />
				You last visited the site on: <?php echo $user->get('lastvisitDate');?></p>
				<?php endif; ?>
			</div><!-- end branding -->
			
			<?php if ($this->countModules('top')) : ?>
			<div id="top-module">
				<jdoc:include type="modules" name="top" style="xhtml" />
			</div><!-- end top-module -->
			<?php endif; ?>    
		</div><!-- end header -->

		<div id="breadcrumbs">
			<p>You are here: <jdoc:include type="module" name="breadcrumb" /></p>
		</div><!-- end breadcrumbs -->

		<?php if ($this->countModules('navigation')) : ?>
		<a id="mainmenu" name="mainmenu"></a>
		<div id="nav" class="clr">
			<jdoc:include type="modules" name="navigation" style="raw" /> 
		</div><!-- end nav -->
		<?php endif; ?>

		<div id="body-content" class="clr clearfix">    
			<?php if ($this->countModules('user1 or user2 or user3 or user4')) : ?>
			<div id="top-user-modules" class="clearfix">
				<div class="inside">
				
					<?php if ($this->countModules('user1')) : ?>
					<div id="user1" class="count<?php echo $toptotal ;?>">
						<div class="inside">
							<jdoc:include type="modules" name="user1" style="xhtml" />
						</div><!-- end inside -->
					</div><!-- end user1 -->
					<?php endif; ?>
					
					<?php if ($this->countModules('user2')) : ?>
					<div id="user2" class="count<?php echo $toptotal ;?>">
						<div class="inside">
							<jdoc:include type="modules" name="user2" style="xhtml" />
						</div><!-- end inside -->
					</div><!-- end user2 -->
					<?php endif; ?>
					
					<?php if ($this->countModules('user3')) : ?>
					<div id="user3" class="count<?php echo $toptotal ;?>">
						<div class="inside">
							<jdoc:include type="modules" name="user3" style="xhtml" />
						</div><!-- end inside -->
					</div><!-- end user3 -->
					<?php endif; ?>
					
					<?php if ($this->countModules('user4')) : ?>
					<div id="user4" class="count<?php echo $toptotal ;?>">
						<div class="inside">
							<jdoc:include type="modules" name="user4" style="xhtml" />
						</div><!-- end inside -->
					</div><!-- end user4 -->
					<?php endif; ?>
				
				</div><!--end inside-->		
			</div><!-- end top-user-modules -->
			<?php endif; ?>
			
			<div id="load-first" class="clearfix">     
				<div id="middle-column">
					<div class="inside">      
						<a id="content" name="content"></a>
						<div id="main-body">
							<?php if ($this->getBuffer('message')) : ?>
						<div class="error">
							<h2> Message </h2>
							<jdoc:include type="message" />
						</div>
						<?php endif; ?>
							<jdoc:include type="component" />
						</div><!-- end main-body -->
					</div><!-- end inside -->
				</div><!-- end middle-column -->
				
				<?php if ($left) : ?>
				<div id="left">
					<div class="inside">      
						<?php if ($this->countModules('left')) : ?>
						<jdoc:include type="modules" name="left" style="xhtml" />
						<?php endif; ?>        
						<?php if ($this->countModules('syndicate')) : ?>
						<jdoc:include type="modules" name="syndicate" style="xhtml" />
						<?php endif; ?>
					</div><!-- end inside -->
				</div><!-- end left -->
				<?php endif; ?>     
			</div><!-- end load-first -->
			
			
			<?php if($right) : ?>
			<div id="right">
				<div class="inside">
					<jdoc:include type="modules" name="right" style="xhtml" />
				</div><!-- end inside -->
			</div><!-- end RightCol -->
			<?php endif; ?>
			
			<?php if ($this->countModules('user5 or user6 or user7 or user8')) : ?>
			<a id="additional" name="additional"></a>
			<div id="bottom-user-modules" class="clearfix">      
				<div class="inside">		
				<?php if ($this->countModules('user5')) : ?>
				<div id="user5" class="count<?php echo $bottomtotal ;?>">
					<div class="inside">
						<jdoc:include type="modules" name="user5" style="xhtml" />
					</div><!-- end inside -->
				</div><!-- end user5 -->
				<?php endif; ?>
				
				<?php if ($this->countModules('user6')) : ?>
				<div id="user6" class="count<?php echo $bottomtotal ;?>">
					<div class="inside">
						<jdoc:include type="modules" name="user6" style="xhtml" />
					</div><!-- end inside -->
				</div><!-- end user6 -->
				<?php endif; ?>
				
				<?php if ($this->countModules('user7')) : ?>
				<div id="user7" class="count<?php echo $bottomtotal ;?>">
					<div class="inside">
						<jdoc:include type="modules" name="user7" style="xhtml" />
					</div><!-- end inside -->
				</div><!-- end user8 -->
				<?php endif; ?>
				
				<?php if ($this->countModules('user8')) : ?>
				<div id="user8" class="count<?php echo $bottomtotal ;?>">
					<div class="inside">
						<jdoc:include type="modules" name="user8" style="xhtml" />
					</div><!-- end inside -->
				</div><!-- end user8 -->
				<?php endif; ?>
				</div><!-- end inside -->      
			</div><!-- end bottom-user-modules -->
			<?php endif; ?>     
		</div><!-- end body-content -->    

		<div id="footer" class="clearfix">
			<div class="inside">
				<?php if ($this->countModules('footer')) : ?>
				<jdoc:include type="modules" name="footer" style="xhtml" />
				<?php endif; ?>	
				<!-- Back to top link -->
				<div id="backtotoplink">
					<a href="<?php $url->setFragment('top'); echo $url->toString();?>" class="to-additional">Back to Top</a>
				</div>
			</div><!-- end inside -->
		</div><!-- end footer -->    
	</div><!-- end container -->
		
	<?php if ($this->countModules('debug')) : ?>
	<div id="debug"><jdoc:include type="modules" name="debug" /></div>
	<?php endif; ?>    
</body>
</html>
<?php endif; ?>